Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / core / ble / src / commonMain / kotlin / org / meshtastic / core / ble / KablePlatformSetup.kt

Displaying Raw • Download

core/ble/src/commonMain/kotlin/org/meshtastic/core/ble/KablePlatformSetup.kt renovate/net.java.dev.jna-jna-5.x (5a8f4966) Text, 2.12 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.ble

Tff7b72import T7ee787com.juul.kable.Peripheral
Tff7b72import T7ee787com.juul.kable.PeripheralBuilder

T8b949e/** Platform-specific configuration for the Peripheral builder based on device type. */
Tff7b72internal Tff7b72expect Tff7b72fun Te6edf3PeripheralBuilderTb4b4b4.Td2a8ffplatformConfigTb4b4b4(Te6edf3deviceTb4b4b4: Te6edf3BleDeviceTb4b4b4, Te6edf3autoConnectTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657BooleanTb4b4b4)

T8b949e/** Platform-specific instantiation of a Peripheral by address. */
Tff7b72internal Tff7b72expect Tff7b72fun Td2a8ffcreatePeripheralTb4b4b4(Te6edf3addressTb4b4b4: Tffa657StringTb4b4b4, Te6edf3builderActionTb4b4b4: Te6edf3PeripheralBuilderTb4b4b4.Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4)Tb4b4b4: Te6edf3Peripheral

T8b949e/**
* Returns the negotiated maximum write payload length in bytes (i.e. ATT MTU minus the 3-byte ATT header), or `null` if
* MTU has not yet been negotiated on this platform.
*/
Tff7b72internal Tff7b72expect Tff7b72fun Te6edf3PeripheralTb4b4b4.Td2a8ffnegotiatedMaxWriteLengthTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Int?

T8b949e/**
* Requests the highest-throughput BLE connection priority (smallest connection interval) supported by the platform.
*
* Returns `true` if the request was issued successfully. On platforms without an equivalent API (JVM/iOS) this is a
* no-op returning `false`. Used by latency-sensitive flows such as DFU firmware streaming.
*/
Tff7b72internal Tff7b72expect Tff7b72fun Te6edf3PeripheralTb4b4b4.Td2a8ffrequestHighConnectionPriorityTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean

T8b949e/**
* Requests balanced BLE connection priority (default ~30–50 ms interval) to reduce battery draw after latency-sensitive
* operations complete. On platforms without an equivalent API (JVM/iOS) this is a no-op.
*/
Tff7b72internal Tff7b72expect Tff7b72fun Te6edf3PeripheralTb4b4b4.Td2a8ffrequestBalancedConnectionPriorityTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean

Served by rngit 1.5.0 - Generated in 0.08s